package com.xyz.study.design_mode.q_observer.mode;

/**
 * 角色：ConcreteObserver 具体的观察者
 * @author XYZ
 * @version 1.0.0
 * @since 2021-01-27 18:35
 */
public class UserChangeInvalidTokenListener implements EventListener{
    @Override
    public void onEvent(Event event) {
        if (!(event instanceof UserChangeEvent)) {
            return;
        }
        UserChangeEvent userChangeEvent = (UserChangeEvent) event;
        System.out.println("旧用户：" + userChangeEvent.getUserIdOld() + "的token失效！");
    }
}
